<template>
  <div>
    <h1>退货订单</h1>
    <br>
<!--    <span>查询商品</span>
    <el-input type="text" v-model="SQEName" placeholder="商品名称" style="width: 10%"></el-input>
    <el-input type="text" v-model="startNumber" placeholder="起始数量" style="width: 10%"></el-input>
    <el-input type="text" v-model="endNumber" placeholder="结束数量" style="width: 10%"></el-input>
    &lt;!&ndash;下拉列表&ndash;&gt;
    &lt;!&ndash;placeholder 提示信息&ndash;&gt;
    <span>未定销售价</span>
    <el-select v-model="edu">
      &lt;!&ndash;label 指的是显示的值&ndash;&gt;
      &lt;!&ndash;value 代表的是需要提交给服务器的值&ndash;&gt;
      <el-option label="不限" value="0"></el-option>
      <el-option label="未定销售价" value="1"></el-option>
    </el-select>
    &lt;!&ndash;下拉列表&ndash;&gt;
    &lt;!&ndash;placeholder 提示信息&ndash;&gt;
    <span>类别</span>
    <el-select v-model="edus">
      &lt;!&ndash;label 指的是显示的值&ndash;&gt;
      &lt;!&ndash;value 代表的是需要提交给服务器的值&ndash;&gt;
      <el-option value="电脑产品"></el-option>
      <el-option value="安防产品"></el-option>
      <el-option value="打印扫描设备"></el-option>
      <el-option value="办公用品"></el-option>
    </el-select>
    <el-button type="primary" @click="search()">搜索</el-button>
    <br><br>-->
    <el-row>
      <el-table :data="returnOrderList" stripe>
        <el-table-column prop="orderNo" label="退货订单编号"></el-table-column>
        <el-table-column prop="supplierNo" label="供应商编号"></el-table-column>
        <el-table-column prop="supplierName" label="供应商名称"></el-table-column>
        <el-table-column prop="returnCause" label="退货原因"></el-table-column>
        <el-table-column prop="totalPrice" label="总价"></el-table-column>
        <el-table-column prop="ruturnTime" label="退货时间"></el-table-column>
        <el-table-column prop="commodityName" label="商品名称"></el-table-column>
        <el-table-column prop="commoditySpec" label="商品规格"></el-table-column>
        <el-table-column prop="commodityPrice" label="进货价格"></el-table-column>
        <el-table-column prop="commodityNum" label="退货数量"></el-table-column>
        <el-table-column label="操作">
          <template #default="scope">
<!--            <el-button type="primary" @click="affirm(scope.row,1)">通过</el-button>-->
<!--            <el-button type="primary" @click="affirm(scope.row,2)">拒绝</el-button>
            <el-button type="primary" @click="failed(scope.row)">详情</el-button>-->
          </template>
        </el-table-column>
      </el-table>
    </el-row>

  </div>
</template>

<script>
import axios from "axios";
import {ElMessage} from "element-plus";

export default {
  name: "Stock",

  created() {
    this.search()
  },


  data() {
    return {
      returnOrderList:[],
      goodsList: [],
      supplier: {},
      SQEName: '',
      startNumber: '',
      endNumber: '',
      edu: '0',
      edus: '',
      pick: false,
      picks: false,
      form: {
        commoditySerialNumber: '',
        commodityName: '',
        brand: '',
        category: '',
        purchasePrice: '',
        repertoryAmount: '',
        salePrice: '',
        img: '',
      }

    }

  }, methods: {
    search() {



      axios.post("/apf/returngoods/selectReturnGoods", null,
          {
            'headers': {'token': localStorage.getItem("token")}
          }).then(res => {
        this.returnOrderList = res.data
      })
    },
    query(scope) {
      this.pick = true
      this.form = scope
    },
    determine() {
      this.pick = false
    },
    updateBy(scope) {
      this.form = scope
      this.picks = true

    },
    determineBY(){
      axios.post("/api/CommodityRepertory/updateGoodsBean",this.form).then(res=>{
        this.picks = false
        ElMessage({
          message: '修改成功',
          type: 'success'
        })
        this.search()
      })
    },
    download(){

      window.open("/api/CommodityRepertory/getexcel")
    }
  }
}
</script>

<style scoped>

</style>